Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jung/staking #69

Open
wants to merge 158 commits into
base: master
Choose a base branch
from
Open

Jung/staking #69

wants to merge 158 commits into from

Conversation

prateekreddy
Copy link
Member

No description provided.

contracts/staking/l2_contracts/JobManager.sol Outdated Show resolved Hide resolved
contracts/staking/l2_contracts/NativeStaking.sol Outdated Show resolved Hide resolved
contracts/staking/l2_contracts/NativeStaking.sol Outdated Show resolved Hide resolved
contracts/staking/l2_contracts/SymbioticStaking.sol Outdated Show resolved Hide resolved
_verifyProof(_jobId, _proof);

uint256 feePaid = jobs[_jobId].feePaid;
uint256 pendingInflationReward = _updateInflationReward(jobs[_jobId].operator);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function should probably be part of rewardManager or stakingManager.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[discuss]

if (operatorJobCompletionEpochs[_operator].length == 0) return 0;

// list of epochs in which operator has completed jobs
uint256[] storage completedEpochs = operatorJobCompletionEpochs[_operator];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The array size for an operator will always be 1. Because in the next epoch, if there was some job completed then the distribution happens right? Is there a way apart from job completion when this is updated?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why it always becomes 0.

Current epoch number gets pushed into the array if the last element of the array isn't current epoch.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

contracts/staking/l2_contracts/RewardDistributor.sol Outdated Show resolved Hide resolved
contracts/staking/l2_contracts/RewardDistributor.sol Outdated Show resolved Hide resolved
contracts/staking/l2_contracts/RewardDistributor.sol Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants